// TOWN DIALOGUE SCRIPT
//    Town 12: Lorelei

begintalkscript;

variables;

short i,j,k,r1,choice;


begintalknode;
	tag = 1;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "The soldiers here managed to capture a small giant and stow it away in this cell. You try to talk to it, but all it does is swear and snarl.";

// Mayor Bruette

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 1;
	question = "Mayor Bruette";
	text1 = "You meet an aging woman, her dark hair shot through with many thin bands of gray. She wears the mayor's sash of Lorelei. It weighs her down as if it is made of lead.";
	text2 = "_I am Mayor Bruette. Welcome, traveler. You have come far and done much. That is why you were allowed into our beleaguered city._";
	text5 = "Mayor Bruette sits limply in her chair. Exhaustion and worry wear her down, aging her before her time. _What else do you need, adventurer?_";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_You are the leader here?_";
	text1 = "_Yes. I am the mayor of the fair city of Lorelei. My queen has charged me with maintaining the city._";

begintalknode;
	state = 2;
	nextstate = -1;
	question = "_Your queen?_";
	text1 = "_Empress Prazac leads the Empire now. She watches over us from Blackcrag Fortress, though nobody in Valorim can get in to see her._";


begintalknode;
	state = 2;
	nextstate = -1;
	question = "_What is it like to be mayor?_";
	text1 = "_Being the mayor of Lorelei is a difficult job, I'm afraid. I have the sacred duty of maintaining this fair city as best I can, despite the attacks._";
	text3 = "_Being the mayor of Lorelei is a difficult job, I'm afraid. I have the sacred duty of maintaining this fair city as best I can. It is easier now that the giants are leaving us be, but there are many repairs to be made. There is much work ahead of us._";
	action = DEP_ON_SDF 307 8 0;

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_How fares Lorelei?_";
	text1 = "She slumps in her throne. _It is not what it was. We have been grievously hurt. Maybe soon the Empire will aid us and we will rise again. For now they have chosen to withdraw. We have been left to fend for ourselves._";
	text3 = "She slumps in her throne. _It is not what it was. We have lost much in our struggles. But soon the Empire will aid us, I am sure, and we will rise again. For now they have chosen to withdraw._";
	action = DEP_ON_SDF 307 8 0;

begintalknode;
	state = 3;
	nextstate = 4;
	question = "_Why has the Empire withdrawn?_";
	text1 = "_The continent of Valorim is under quarantine. Empire troops have not come to aid us for some time. I am sure it is temporary. All we need to do is survive. They will surely come to aid us soon. They must._";

begintalknode;
	state = 4;
	nextstate = -1;
	question = "_What have you done to survive the quarantine?_";
	text1 = "_Nothing, yet. We are conserving our resources and waiting for the Empire. They must come to help us soon. Some of my troops criticize me for doing nothing to fight the giants. What fools they are!_";

begintalknode;
	state = 4;
	nextstate = 7;
	condition = gf(12,17) <= 1;
	question = "_Can you send a message to the Empire?_";
	text1 = "_I have tried. The Empire's great castle on Valorim, Blackcrag Fortress, is north of here. But the gates are closed against us. I am trying to find if there is a hidden way in, but I have had no luck._";
	text2 = "_My faith in the Empire is absolute, but I wish there was a way I could get a courier to see Empress Prazac. I would reward one who could tell me how to reach her._";
	action = SET_SDF 12 17 1;
		code =
		toggle_quest(71,1);
	break;

begintalknode;
	state = 7;
	nextstate = -1;
	question = "_Any idea how I might get in?_";
	text1 = "She looks around and then leans close to you. _I've heard rumors. The Castle is not entirely closed off. They left a way for couriers with news of our suffering to sneak in. Search the area around Blackcrag. You might be lucky._";
	
begintalknode;
	state = 1;
	nextstate = 5;
	question = "_Mayor, have you any missions for me?_";
	text1 = "She leans forward and pats you on the arm. _We have no need for your help, not with the Empire to look after us. Rest, stay safe, and wait. The Empire will provide. I'm sure of it._";

begintalknode;
	state = 5;
	nextstate = -1;
	condition = gf(12,16) == 0;
	question = "_Are you sure that course is wise? Hasn't the Empire left you to your fate?_";
	text1 = "She looks annoyed. _If I did not think you could be useful to us, I would have you jailed for those treasonous statements._";
	text2 = "_Anything we do may interfere with what the Empire is surely planning to help us! Empress Prazac will provide. It is not for you to question her._";
	action = SET_SDF 12 16 1;

begintalknode;
	state = 5;
	nextstate = -1;
	condition = gf(12,16) == 0;
	question = "_That seems like a wise course. The Empire will provide for you._";
	text1 = "_I am glad that someone sees how wise I am being. Anything we do may interfere with what the Empire is surely planning to help us! To doubt the Empire's concern for us is to doubt the Empire. I cannot have that._";
	action = SET_SDF 12 16 1;
	

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(12,17) == 1 && gf(34,14) >= 1;
	question = "_I have found a route into Blackcrag Fortress._ (Describe it to her.)";
	code =
		run_hardcode(39);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	question = "_I could use supplies._";
	text1 = "_You are an outsider. Many think you are ... suspicious. Still, I have given the order. You have the run of the town. I suggest you stay indoors, though. Giants are always throwing rocks over the walls._";
	
begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(307,8) > 0;
	question = "_I have caused the giants to fight a different foe._ (Tell the tale.)";
	text1 = "The mayor listens to the tale of the Barrier Cavern. You can tell that she doesn't believe a word of it. _True, most of the giants have stopped attacking us. That doesn't mean I will let every scruffy traveler claim credit and grab a reward._";
	
// Dwaine

begintalknode;
	tag = 60;
	state = -1;
	nextstate = 29;
	question = "Dwaine";
	text1 = "There is a warrior hiding in this dank back room, a long curved blade resting across his lap. He looks up at you, and you see that his skin is very pale.";
	text2 = "_I am Dwaine. Welcome. I am glad you have reached me._";
	text5 = "Dwaine smiles at you. His eyes sparkle. He acts is if he knows many things you don't, and it amuses him. _Yes? Can I help?_";
	action = INTRO;

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_May I speak with you?_";
	text1 = "He leans close and whispers _Of course. I have eagerly awaited your arrival. I am an Avernite, sent by Unspec like yourself. Now that we have made contact, I have information._";
	text2 = "He leans close and whispers _I am here, in part, to help you. Ask what you want to know._";
	action = SET_SDF 12 18 1;

begintalknode;
	state = 30;
	nextstate = -1;
	question = "_It's good to meet a fellow Avernite. How have you been up here?_";
	text1 = "_I don't miss Avernum at all, I'm afraid. Spying up here is intensely dangerous, but I wouldn't go back. The sunlight. The food. I'm sure you understand._";

begintalknode;
	state = 30;
	nextstate = -1;
	question = "_Unspec?_";
	text1 = "_I'm Unspecified Services. Remember? Your employers? I've been gathering information and waiting for colleagues to arrive._";

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_Why have you been waiting for me?_";
	text1 = "_I have things to report. A few odd facts. The leaders of the cities are confused. The Empire has quarantined the whole continent. There's a thieves guild in Lorelei. Nothing surprising._";
	text2 = "_However, I have managed to worm out one invaluable piece of information. It's about Empress Prazac._";
	
begintalknode;
	state = 31;
	nextstate = -1;
	question = "_What can you say about the Thieves Guild?_";
	text1 = "_It's a guild of criminals. They no doubt possess much illicit information that would be useful to us. I know their leader is in this city, but I don't know where. I also know that they do a lot of business involving packages from Shayder._";
	text2 = "_If you could contact them, it could be very interesting. Just so you know._";

begintalknode;
	state = 31;
	nextstate = -1;
	question = "_What about Empress Prazac?_";
	code =
		run_hardcode(156);
	break;

begintalknode;
	state = 31;
	nextstate = 32;
	question = "_Why has the Empire quarantined this area?_";
	text1 = "_It is truly insane! The Empire saw all the problems down here and said, 'We can't deal with this.' They closed the borders, sealed up the Keep of Tinraya, and left._";
	text2 = "_There is something about the monsters, the slimes and roaches and so on, which terrifies the Empire. Valorim was already a wild place, and they didn't entirely trust it. So there you are._";

begintalknode;
	state = 32;
	nextstate = 33;
	question = "_Know anything about Keep of Tinraya?_";
	text1 = "_Can't find much about that. Even asking about it is ... touchy. It was the biggest city in Valorim, up to the northwest. Then monsters attacked it, some sort of monster even worse than everything else, even the golems._";
	text2 = "_The whole place was devastated, and the Empire walled it off so the creatures couldn't escape._";

begintalknode;
	state = 33;
	nextstate = -1;
	question = "_Golems?_";
	text1 = "_Gale, to the northeast, has been bombarded by waves of golems. Nasty constructs. Don't know much about it._";
	text3 = "_Gale, to the northeast, was bombarded by waves of golems. Nasty constructs. Don't know much about it. I did hear that the attacks stopped recently. Probably just a rumor._";
	action = DEP_ON_SDF 308 0 0;


// Gertrude

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 85;
	question = "Gertrude";
	text1 = "A stocky woman walks around the shop, polishing a steel shield as she inspects her wares. She looks pleased to see potential customers. _I am Gertrude the armorsmith._";
	text5 = "Gertrude waits on you attentively.";
	action = INTRO;

begintalknode;
	state = 85;
	nextstate = 86;
	question = "_What sort of items do you specialize in?_";
	text1 = "_I'm the town armorsmith. I'm pleased to see you. Business has been slow lately._";

begintalknode;
	state = 86;
	nextstate = 87;
	question = "_Why has it been slow?_";
	text1 = "_Everyone is leaving. And that's not likely to change. Nobody wants to stay in a city in which death strikes at random anyone out in the streets._";
	text3 = "_Less giant attacks. Less carnage means less business. Sad, but true._";
	action = DEP_ON_SDF 307 8 0;

begintalknode;
	state = 87;
	nextstate = -1;
	question = "_How are people killed randomly?_";
	text1 = "_The giants lob boulders over the walls, day and night. They move up, throw a few, and run before our soldiers can do anything. Nobody goes out. Not good for business._";

begintalknode;
	state = 85;
	nextstate = -1;
	question = "_Can I do some trading?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Gertrude's Armor","Some of Gertrude's goods have large dents in them. You have the eerie suspicion that they belonged to victims of the giants.",84,5,3);
	break;

begintalknode;
	state = 85;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 85;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_All right. Watch out when you go outside. Rocks might kill you._";
	action = END_TALK;
	
// Carson

begintalknode;
	tag = 120;
	state = -1;
	nextstate = 113;
	question = "Carson";
	text1 = "This man wears the long, flowing robes of a priest. Yet, instead of tending to an altar, he sits behind this counter. In your experience, it is unusual to see a holy man running a shop. Strange times.";
	text2 = "_I am Father Carson. Welcome to my little shop._";
	text5 = "Father Carson smiles serenely. _Are you interested in any of my goods, so that you may continue to fight for righteousness?_";
	action = INTRO;

begintalknode;
	state = 113;
	nextstate = 114;
	question = "_Is this your shop?_";
	text1 = "_I am a priest of the Church of the Divine Lucre. As part of my worship, I run this shop._";

begintalknode;
	state = 114;
	nextstate = 115;
	question = "_What sort of faith does the Divine Lucre profess?_";
	text1 = "He frowns. _I don't feel like discussing my faith now. Certainly not for free. We believe that the best way to improve the world is to improve ourselves, and we will bring everything up with us._";
	text2 = "_But enough of all that. Time for worship._";

begintalknode;
	state = 115;
	nextstate = 116;
	question = "_How do you worship?_";
	text1 = "_My holy observances will be in the form of getting rich. It is the best way to improve oneself, because your progress can be precisely measured._";

begintalknode;
	state = 113;
	nextstate = -1;
	question = "_May we purchase some of your wares?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Carson's Weapons","Carson is a priest of the Church of the Divine Lucre. This means that his goods are of high quality, but no bargains will be had.",85,4,3);
	break;

begintalknode;
	state = 113;
	nextstate = -1;
	question = "_Can you teach me any holy rituals?_";
	text1 = "_I am afraid not. I am nowhere wealthy enough to be given that privilege by my church._";

begintalknode;
	state = 113;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 113;
	nextstate = 113;
	question = "_Perhaps another time._";
	text1 = "_All right, then. Excuse me. Time is money._";
	action = END_TALK;


// Yukiko

begintalknode;
	tag = 240;
	state = -1;
	nextstate = 401;
	question = "Yukiko";
	text1 = "This woman was intensely studying a thick tome when you entered. She rises and shows you into her small training hall. _Please wipe your feet before you walk onto the sparring floor._";
	text2 = "_I am Yukiko. Sometimes I go by Yukiko the Learned. Welcome, warrior._";
	text5 = "Yukiko says, _What do you wish know, honored warrior? What assistance can I give you for your many struggles to come?_";
	action = INTRO;

begintalknode;
	state = 401;
	nextstate = 402;
	question = "_What is your job here?_";
	text1 = "_I am the chief instructor for Lorelei Vocational Technologies._";

begintalknode;
	state = 402;
	nextstate = 401;
	question = "_So what do you teach, then?_";
	text1 = "_Skills for exploration and battle. The warriors of Lorelei aren't always skilled, and I'm the one who gets stuck with doing the bulk of the training._";

begintalknode;
	state = 402;
	nextstate = 403;
	question = "_What are Vocational Technologies?_";
	text1 = "_Vocations. You know. Like killing monsters with swords. Killing monsters with spells. Killing monsters with poison and assassination. All of those productive activities._";
	text2 = "_We aren't like the University of Valorim, wasting students' time with non-practical knowledge. The upshot of all this is, if you want training, this is the place to come._";

begintalknode;
	state = 403;
	nextstate = -1;
	question = "_The University of Valorim?_";
	text1 = "_The former university, more like. They taught about plants and history and alchemy. Arts that aren't useful when giants are smashing down your gates._";
	text2 = "_Most of its students and teachers have fled. Only poor Carlos remains._";
	
begintalknode;
	state = 401;
	nextstate = -1;
	question = "_Can you train me?_";
	text1 = "_Certainly. That is, if you are willing to spend the time and provide a donation for the school's upkeep._";
	
begintalknode;
	state = 401;
	nextstate = -1;
	condition = 1;
	question = "_I would like training._";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Yukiko the Learned",
		  "Yukiko teaches a variety of skills for exploration and battle.",
		  86,4,0);	
	break;

begintalknode;
	state = 401;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_Then go, and fight well._";
	action = END_TALK;

// Lewis UNUSED

begintalknode;
	tag = 260;
	state = -1;
	nextstate = 429;
	question = "Lewis";
	text1 = "A muscular, swarthy horseman sits at the table, cleaning a bit and bridle. He wears a loose shirt open to the navel and is deeply, intensely tanned. _I'm Lewis,_ he says, in a deep, manly voice.";
	text5 = "Time spent speaking with Lewis gives you more time to note his rippling muscles, deeply tanned, flawless skin, and carefully cultivated chin stubble. It's very imposing. Or funny. You aren't sure which.";
	action = INTRO;

begintalknode;
	state = 429;
	nextstate = 430;
	question = "_What trade are you in?_";
	text1 = "_I am a horseman, by trade. I breed and raise the mighty beasts._ A trickle of sweat trickles down his muscular chest as he speaks.";

begintalknode;
	state = 430;
	nextstate = 431;
	question = "_How's business?_";
	text1 = "His chest heaves mightily. _It's been a difficult job. Unsafe to take the mighty beasts out, what with the giants._";

begintalknode;
	state = 430;
	nextstate = 432;
	question = "_Do you ever sell your horses?_";
	text1 = "_Yes. I raise the mightiest and most noble of beasts, deserving of mighty and noble owners. Brave souls, much like yourselves. For 600 coins, I can outfit you with a group of sweaty chargers. A purchase you'll never regret._";

begintalknode;
	state = 432;
	nextstate = -1;
	question = "_Sounds like a fair price. We'll take 'em._";
	code =
		run_hardcode(157);
	break;

begintalknode;
	state = 431;
	nextstate = 430;
	question = "_What have the giants been doing to your horses?_";
	text1 = "_Terrible things, which usually end in a stewpot._";
	text2 = "_You never know when a flying rock will cripple one of my poor animals. I've been keeping them inside for some time. It's not good for them._";

begintalknode;
	state = 429;
	nextstate = -1;
	condition = has_spec_item(41) > 0;
	question = "_I'm trying to deliver a package to someone named Kendra. Where might I find her?_";
	text1 = "He looks suspicious, but he says nothing. _Her shop is in the northwest corner of town. A very reputable establishment._";

begintalknode;
	state = 429;
	nextstate = -1;
	condition = gf(14,1) >= 1;
	question = "_Can we buy more horses from you?_";
	code =
		run_hardcode(157);
	break;

begintalknode;
	state = 429;
	nextstate = -1;
	condition = gf(14,1) >= 1;
	question = "_Where are the stables?_";
	text1 = "_Right by the west gate of town._";

// Ligaya

begintalknode;
	tag = 280;
	state = -1;
	nextstate = 457;
	question = "Ligaya";
	text1 = "This small shop is filled with feathers. They're everywhere: floating in the air, getting caught in your hair, making you sneeze. Through the cloud you see a young woman preparing a bird for roasting.";
	text2 = "_I'm Ligaya. Sorry about the feathers._";
	text5 = "Ligaya smiles at you briefly and returns to work. She is pulling the feathers out of a recently deceased duck at an amazing rate. Bits of down fly into the air, making your nose itch.";
	action = INTRO;

begintalknode;
	state = 457;
	nextstate = 458;
	question = "_Is that bird going up for sale soon?_";
	text1 = "_Hopefully. I sell fine roast poultry!_ she says chirpily, while picking bits of feather off the stuffed bird.";

begintalknode;
	state = 458;
	nextstate = 459;
	question = "_What sort of fine food do you sell?_";
	text1 = "_I am a specialist in the preparation of all manner of avian life forms. Turkeys, doves, pheasants, finches, chickens, ravens, I can prepare them all. It's even easier with the giants about._";

begintalknode;
	state = 459;
	nextstate = 460;
	question = "_How have the giants made it easier?_";
	text1 = "She pauses to pull a small bit of down out of her eye. _When throwing rocks at the city, they often aim at birds. They think it's fun. The dead birds fall into the city and get collected, and I make them delicious! One small good thing about all the danger._";

begintalknode;
	state = 460;
	nextstate = -1;
	question = "_Isn't it dangerous to collect the dead birds in the street?_";
	text1 = "_I have Deborah do most of the collecting for me. She's a beggarwoman and needs the work. I do worry about her though, what with all the rocks falling. Need something to eat?_";
	text3 = "She looks very sad. _Deborah was the beggarwoman who collected the birds for me. A rock got her, I'm afraid. I collect myself now. The hill giants have been hell for us all._";
	code =
		if (day_reached(165,2))
			remove_string(1);
			else remove_string(3);
	break;

begintalknode;
	state = 457;
	nextstate = -1;
	question = "_Can we buy some food?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Ligaya's Birds","Ligaya is a master at the preparation of poultry. Her turkey jerky is renowned throughout all of central Valorim.",87,3,3);
	break;
	
begintalknode;
	state = 457;
	nextstate = -1;
	condition = has_spec_item(41) > 0;
	question = "_I'm trying to deliver a package to someone named Kendra. Where might I find her?_";
	text1 = "She seems suspicious, but she says nothing. _Her shop is in the northwest corner of town. A very reputable establishment._";
	
begintalknode;
	state = 457;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_Be safe out there, then. Watch the skies._";
	action = END_TALK;

// Lyle

begintalknode;
	tag = 300;
	state = -1;
	nextstate = 485;
	question = "Lyle";
	text1 = "This man nods when you approach. _I am Lyle, of Empire Internal Affairs._ He must be an agent acting on behalf of the Empire in Lorelei.";
	text2 = "He's surrounded by a forest of forms, schedules, and notes, which he battles with a worn goose quill pen.";
	text5 = "Lyle continues to battle his paperwork. His tenure as an Internal Affairs agent seems to be immersing him in the deepest and murkiest pools of the bureaucracy.";
	action = INTRO;

begintalknode;
	state = 485;
	nextstate = 486;
	question = "_May I speak with you?_";
	text1 = "_Have a seat._ You sit. _I'm Internal Affairs for Lorelei. A job of uneven difficulty, let me tell you._";

begintalknode;
	state = 486;
	nextstate = 487;
	question = "_Uneven difficulty? What do you mean?_";
	text1 = "_With the giants coming and going, people mainly stay inside and don't do anything. That makes things easier. But I sometimes have to go out to serve papers and inspect things. That makes things harder._";
	text2 = "He leans forward and lowers his voice. _It would be better if our leadership was stronger._";

begintalknode;
	state = 485;
	nextstate = 488;
	question = "_What sort of responsibilities does an Internal Affairs agent have here?_";
	text1 = "_Whatever is needed. And, right now, what is needed is strange and time-consuming. The main thing that would concern you is that I'm the mission dispatcher. Also, oddly, I've been given a mansion to sell._";
	text3 = "_Whatever is needed. And, right now, what is needed is strange and time-consuming. The main thing that would concern you is that I'm the mission dispatcher. At least I don't have to unload that mansion anymore._";
	code =
		if (has_spec_item(16) == 0)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 487;
	nextstate = 488;
	question = "_How has the leadership of Lorelei been lacking?_";
	text1 = "He says quietly, _Our mighty mayor seems inclined to wait until the Empire sends help before taking action. I feel help is not likely to come._ He shrugs. _But what can I do? I'm just the jobs dispatcher. Also, oddly, I've been given a mansion to sell._";
	text3 = "He says quietly, _Our mighty mayor seems inclined to wait until the Empire sends help before taking action. I feel help is not likely to come._ He shrugs. _But what can I do? I'm just the jobs dispatcher._";
	code =
		if (has_spec_item(16) == 0)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 488;
	nextstate = -1;
	question = "_What sort of missions are there for me?_";
	text1 = "_There are two mission boards out in the streets. See if there's anything you can do. We can always use the help._";
	text2 = "He checks his notes. _Oh, except for the timed jobs. You failed one of those for us. You can't get more for a while._";
	code =
		if (gf(295,3) == 0)
			rs(2);
	break;

begintalknode;
	state = 488;
	nextstate = 489;
	condition = has_spec_item(16) <= 0;
	question = "_Tell me about the mansion._";
	text1 = "_The owner of Hawke's Manse, a huge, beautiful mansion at the northwest corner of town, was killed by a boulder. He had no heirs. I was told to find a buyer for it._";
	text2 = "_It is a beautiful structure, and quite a bargain. Only eight thousand coins. The only thing necessary is a purchaser. Such as, say, a wealthy adventurer looking for a safe base._";

begintalknode;
	state = 489;
	nextstate = -1;
	question = "_That's a lot of money._";
	text1 = "_For a mansion of this size, it's actually a very low price. It's only so cheap because of the constant giant bombardment._";

begintalknode;
	state = 489;
	nextstate = 485;
	condition = has_spec_item(16) <= 0;
	question = "_I would like to buy Hawke's Manse._ (Pay 8000 coins.)";
	text1 = "He is impressed and relieved. You pay him the 8000 coins. In return, he gives you a simple iron key. _Hawke's Manse is in the northwest corner of town. Enjoy your new home._";
	text3 = "He shakes his head. _It is understandable that you want it, and I can see why you can't afford it. Eight thousand coins is a huge amount. However, I can accept no less._";
	code =
		clear_strings();

				if (coins_amount() >= 8000) {
					add_string(1);
					change_coins(-8000);
					set_spec_item(16,1);
					}
					else add_string(3);
	break;

begintalknode;
	state = 489;
	nextstate = 485;
	condition = has_spec_item(16) <= 0;
	question = "_I guess I don't need a house._";
	text1 = "He is disappointed. _Pity. I really want to unload that pit and get back to my real work._";

begintalknode;
	state = 485;
	nextstate = -1;
	condition = gf(13,12) >= 1;
	question = "_I heard that you might be able to tell me about where to find a powerful magic shield._";
	text1 = "He raises his eyebrows. _Yes. I've heard of such an artifact, but only because Foxfire mentioned it to me. She's a bard. She travels around the towns nearby, playing songs for coins. You may want to ask her about it if you see her._";
	action = SET_SDF 13 13 1;

begintalknode;
	state = 485;
	nextstate = -1;
	condition = gf(12,17) >= 1;
	question = "_You work for the Empire. Do you know how I might be able to enter Blackcrag Fortress?_";
	text1 = "_Hmm. Well, I ... That is illegal, you know. If you were to want to enter, you would be disobeying the commands of Empress Prazac. No matter how much I might want someone, like you, to reach her and tell her how hard life has become here._";
	text2 = "_So, because of that, I will not tell you of the rumors. There have been tales of caverns that lead into Blackcrag, and that the entrance to those tunnels is to the east of that great fortress. Just tales, though. I will not discuss it._";

// Yessenia

begintalknode;
	tag = 320;
	state = -1;
	nextstate = 513;
	question = "Yessenia";
	text1 = "This woman needs more sun. She is pale enough to be an Avernite. She's clearly been cooped up in here among her mountains of scrolls for most of her life. _I am Yessenia._";
	text5 = "Yessenia watches you, her eyes accustomed to the constant shadow. You try to figure out whether she is old or young, but you have no luck. Too dark.";
	action = INTRO;


begintalknode;
	state = 515;
	nextstate = 516;
	question = "_What's it like to be librarian?_";
	text1 = "_Unfortunately, my salary was recently cut. No money left for me. I have to make money other ways._";
	text2 = "_Maybe I'll go up to Moon. They have an excellent collection there._";

begintalknode;
	state = 516;
	nextstate = 517;
	question = "_How do you make money?_";
	text1 = "_I have been duplicating maps. I sell maps of Karnold and Midori provinces for a little extra change. Only 50 coins each._";

begintalknode;
	state = 517;
	nextstate = -1;
	condition = coins_amount() >= 50;
	question = "_I want to buy a map of Karnold Province._ Pay 50 coins.";
	text1 = "You pay the fee and receive a map. Your world map has now expanded.";
	text3 = "You already have this map.";
	code =
		if (gf(309,20) > 0)
			rs(1);
			else {
				rs(3);
				sf(309,20,1);
				change_coins(-50);
				}
	break;

begintalknode;
	state = 517;
	nextstate = -1;
	condition = coins_amount() >= 50;
	question = "_I want to buy a map of Midori Province._ Pay 50 coins.";
	text1 = "You pay the fee and receive a map. Your world map has now expanded.";
	text3 = "You already have this map.";
	code =
		if (gf(309,21) > 0)
			rs(1);
			else {
				rs(3);
				sf(309,21,1);
				change_coins(-50);
				}
	break;


begintalknode;
	state = 516;
	nextstate = -1;
	question = "_What is in Moon?_";
	text1 = "_The town of Moon is north of here, at the north end of Lake Tomor. They have a really great library. They even have spellbooks! That's what I hear. They might pay me what I'm worth._";


begintalknode;
	state = 513;
	nextstate = 520;
	question = "_Any books here that might be of use to adventurers?_";
	text1 = "_Perhaps. There might be. We can't share our rarest tomes with anyone who walks in. Of course, if you were able to do something about the giant attacks, I might be able to help you._";
	text3 = "_Yes. Normally, I wouldn't let strangers look at our rarest tomes. However, the giants have stopped attacking, and I hear rumors that you had something to do with it. So I'll tell you that we have one book which might help you._";
	action = DEP_ON_SDF 307 8 0;

begintalknode;
	state = 520;
	nextstate = -1;
	condition = gf(307,8) >= 1;
	question = "_Where is it?_";
	text1 = "She points at the northwest corner of the library. _It's bound in black leather. Very old prayer book, I think. Mostly drawings. The creatures look like vahnatai. I can't understand any of it, but you might._";
	action = SET_SDF 13 14 1;

begintalknode;
	state = 513;
	nextstate = 515;
	question = "_What do you do in here?_";
	text1 = "_I am the official Librarian of Lorelei._";

begintalknode;
	state = 513;
	nextstate = 514;
	question = "_You look like you don't go outdoors much._";
	text1 = "_Wandering the streets of Lorelei has been hazardous for some time. Fortunately, I am generally disinclined to go outside anyway._";

begintalknode;
	state = 514;
	nextstate = 518;
	question = "_Why don't you like going out?_";
	text1 = "She shakes her head sadly. _My skin becomes painfully burned by even short exposure to the sun. I would not have chosen to spend every moment of my life indoors looking after books. But then, one does what one must._";
	text2 = "_At least it keeps me safe from the giants, and the Avernites have it just as bad._";
	
begintalknode;
	state = 518;
	nextstate = 519;
	question = "_What do you think of the Avernites?_";
	text1 = "_My sister became one. She shared my condition. She had to stay indoors, and she grew angry and bitter. The people feared her. They thought she was a witch. So down she went. I have not seen her for many long years._";
	text2 = "_Soon, though, people's feelings about the Avernites will change. I am sure of it._";

begintalknode;
	state = 519;
	nextstate = 521;
	question = "_What makes you think so?_";
	text1 = "_Oh, you do not fool me. I have heard what you have been doing. Everyone has. Word of your deeds spread, although all are too afraid of the Empire to openly acknowledge the hope they have in you. The news travels by whisper._";
	text2 = "_The Empire will not help us. But Avernum might. We hope and dream, and we will pay Avernum back in kind if we ever get the chance. Oh, and there is one more thing you should know._";

begintalknode;
	state = 521;
	nextstate = -1;
	question = "_What should I know?_";
	text1 = "_Rumors travel. One of them is that there is another Avernite in town. Besides you. You should do some looking around in the southeast corner of town._";
	text2 = "_And that's all I can say. You should go. You may be dangerous company for a poor old woman like me._";
	action = END_TALK;

// Mundt

begintalknode;
	tag = 440;
	state = -1;
	nextstate = 801;
	question = "Mundt";
	text1 = "You meet a priest of the Anama. He walks up to shake your hand, verifying that you bear an Anama ring. He's a tall, distinguished, confident man, not the sort to be concerned with what other people think of him or his beliefs. _I am Father Mundt. Welcome._";
	text5 = "Father Mundt of the Anama waits patiently to see what you want.";
	action = INTRO;

begintalknode;
	state = 801;
	nextstate = -1;
	condition = gf(131,11) == 1 && has_spec_item(40) == 0;
	question = "_Hey! I met Mother Melamed in Kuper. She wants to know what happened to you._";
	text1 = "He smiles. _What? Oh. I'm here. I'm still loyal to the Anama. I just left to do my own thing. You can let her know I'm all right._ He doesn't invite you in, though.";
	action = SET_SDF 12 12 1;

begintalknode;
	state = 801;
	nextstate = -1;
	condition = has_spec_item(40) == 0;
	question = "_Hello?_";
	text1 = "The Anama minister watches you with interest, but he doesn't respond.";
	action = END_TALK;
	
begintalknode;
	state = 801;
	nextstate = 802;
	condition = has_spec_item(40) > 0;
	question = "_I see that the Anama have a place to call their own in Lorelei._";
	text1 = "_We have been tolerated, I'm happy to say. This is a place of safety for those who share our beliefs. I guard this sanctuary._";

begintalknode;
	state = 802;
	nextstate = -1;
	question = "_Are there many believers in this province?_";
	text1 = "_Few believe as we do in these parts. Sometimes, their reactions can be hostile. That is the reason for this protected sanctuary._";

begintalknode;
	state = 802;
	nextstate = 803;
	question = "_How can you provide safety?_";
	text1 = "_My job is to provide succor and rejuvenation for those of our beliefs who are passing through to more hostile lands. My holy strength is adequate to protect our kind from the mindless hostility of others._";

begintalknode;
	state = 803;
	nextstate = -1;
	question = "_What sorts of succor and rejuvenation?_";
	text1 = "_I can provide you healing, at a very reasonable rate. In addition, I have alchemical herbs you can purchase. After all, alchemy is nature's great gift to us._";

begintalknode;
	state = 801;
	nextstate = -1;
	condition = has_spec_item(40) > 0;
	question = "_Do you have any goods for sale?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Mundt's Herbs","The Anama mistrust magic, but they rely heavily on alchemy. Herbs are very valuable to them, and they only share them with their fellow Anama.",88,2,3);
	break;

begintalknode;
	state = 801;
	nextstate = -1;
	condition = gf(131,11) == 1 && has_spec_item(40) > 0;
	question = "_I met Mother Melamed in Kuper. She would really like to know what happened to you._";
	text1 = "He smiles. _Well, now you know. I spread the faith. I walk this path alone, but pure in spirit. When I left her, it was out of cowardice. I wanted to end the struggle, to live in comfort and safety._";
	text2 = "_But Ahonar's faith came with me. I could not escape it. And, when I settled here, I took up the struggle again. But this time, the fight was mine, not theirs. I built this shrine with my own hands. And I am content. Please tell her that._";
	action = SET_SDF 12 12 1;

begintalknode;
	state = 801;
	nextstate = -1;
	condition = has_spec_item(40) > 0;
	question = "_I'll be going now._";
	text1 = "_Travel bravely then, and carry the faith._";
	action = END_TALK;
	
// Deborah

begintalknode;
	tag = 460;
	state = -1;
	nextstate = 829;
	question = "Deborah";
	text1 = "When you get close, this warty beggarwoman kneels and extends her bowl. She's old, thin, and extremely brave to be out on the street like this. Boulders thrown by the giants litter the streets.";
	text2 = "_Greetings, bold adventurer! It is an honor. My name is Deborah._";
	text5 = "Deborah the beggarwoman kneels and extends her bowl. She looks hopeful.";
	action = INTRO;

begintalknode;
	state = 829;
	nextstate = 830;
	question = "_Why are you begging?_";
	text1 = "She bows her head. _My farm was lost in a giant attack. Until peace comes, this is how I must eat._";
	text3 = "She bows her head. _My farm was lost in a giant attack. Until I have a stroke of good fortune, I must beg for my food._";
	action = DEP_ON_SDF 307 8 0;

begintalknode;
	state = 830;
	nextstate = 831;
	question = "_Sorry to hear about your farm._";
	text1 = "_I lost my farm, and my husband. Now I am reduced to begging while trying to regain a more respectable place. Could you please give me a few coins?_";

begintalknode;
	state = 831;
	nextstate = 832;
	condition = coins_amount() >= 5;
	question = "Give five coins.";
	text1 = "You give her a few coins. She is beside herself with thanks. _And kind adventurer, I have advice in return!_";
	code =
		change_coins(-5);
	break;

begintalknode;
	state = 832;
	nextstate = -1;
	question = "_What advice is that?_";
	text1 = "_I hear many rumors. In particular, I've heard there are Avernites wandering all around us! Keep your weapons close. You never know what those treacherous worms will do!_ Then, with another bow of thanks, she stands and walks off.";
	action = END_TALK;

begintalknode;
	state = 831;
	nextstate = -1;
	question = "_I do not give to beggars. Leave me._";
	text1 = "_All right, child. And I hope, for your sake, you never know what it is like to live as I do._ She shuffles off.";
	action = END_TALK;

// Randall

begintalknode;
	tag = 480;
	state = -1;
	nextstate = 857;
	question = "Randall";
	text1 = "This man is dusty. Everything in this shop is dusty. The items, the counter, the proprietor. It's sort of like a junk shop, but some of the old gear looks like it might be useful with a little cleaning.";
	text2 = "He brushes some dust off his arm and walks over to shake your hand. _I'm Randall._";
	text5 = "As Randall speaks with you, he idly brushes dust off his stock with an old rag. Fresh dust, seeing prime places to land, immediately settles on the spots he cleans.";
	action = INTRO;

begintalknode;
	state = 857;
	nextstate = 858;
	question = "_What do you sell here?_";
	text1 = "_Objects of mixed value. I'm an item salesman. I'm so glad you arrived. Business has been terrible._";

begintalknode;
	state = 858;
	nextstate = 859;
	question = "_Why has business been terrible?_";
	text1 = "_Well, what do you expect? Every day, someone gets wounded or killed by a flying rock. No thanks to our leaders._";
	text3 = "_People fled town when the giant attacks started. Now that they've ended, I'm waiting for people to return. But they haven't come back yet._";
	action = DEP_ON_SDF 307 8 0;

begintalknode;
	state = 859;
	nextstate = -1;
	question = "_How are the leaders of the city dealing with it?_";
	text1 = "_Nobody in charge does anything! We just put up walls to get knocked down, and absorb more punishment. Lousy for business. Just lousy._";

begintalknode;
	state = 858;
	nextstate = 860;
	question = "_What is an item salesman?_";
	text1 = "_Here's how it works. Adventurers, looters, and other miscreants get objects. I don't care how. Then they sell them to me. Then others come and buy those objects from me._";
	text2 = "_Our secret? Volume, volume, volume!_";

begintalknode;
	state = 860;
	nextstate = -1;
	question = "_How do you know that the items haven't been stolen?_";
	text1 = "_Well, I don't. I just sort of hope._";

begintalknode;
	state = 857;
	nextstate = -1;
	question = "_Can we trade?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Randall's Randoms","Randall has a wide variety of objects, mostly trash. A few items of potential utility poke out from among the trash.",89,4,3);
	break;

begintalknode;
	state = 860;
	nextstate = 861;
	question = "_Do much volume?_";
	text1 = "He sighs. _Actually, I don't sell much volume of anything. I just say that because it's fun to say. Things were better when Footracer Province was intact._";

begintalknode;
	state = 861;
	nextstate = 862;
	question = "_Where is Footracer Province?_";
	text1 = "_Northwest of here. Well, that's where it was. Its capital was the Keep of Tinraya. Then the hordes of monsters came._";

begintalknode;
	state = 862;
	nextstate = -1;
	question = "_What sort of monsters?_";
	text1 = "_Massive, muscled beasts. Gray. Huge and strong. Lots of teeth. Wiped the whole area out. Now it's walled off. It's a shame. Most of the goods I sold were made in the Keep of Tinraya. Lots of craftsmen there. All gone now._";

begintalknode;
	state = 857;
	nextstate = -1;
	condition = gf(14,11) >= 1;
	question = "_I hear you know about a special shield._";
	text1 = "He thinks. _A shield? No, don't know anything about ... no, wait! Lyle, at Internal Affairs, was in the other day and mentioned he'd heard a rumor about this amazing artifact. Don't know anything else about it._";
	action = SET_SDF 13 12 1;

begintalknode;
	state = 857;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 857;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_Well then, I ..._ He is interrupted by a savage fit of coughing. Must be the dust.";
	action = END_TALK;
	
// Kendra

begintalknode;
	tag = 500;
	state = -1;
	nextstate = 885;
	question = "Kendra";
	text1 = "The woman behind the counter is busy repairing a gauntlet. As she works, she occasionally looks up at you with an amused expression. She acts as if she knows much that you don't. _I'm Kendra. Welcome._";
	text5 = "Kendra keeps polishing the gauntlet. You notice that her stock is dusty. It doesn't look like she does much business.";
	action = INTRO;

begintalknode;
	state = 885;
	nextstate = 886;
	question = "_What's for sale?_";
	text1 = "_Oh, I deal with gloves. I love gloves. They're utterly fascinating._ You detect subtle traces of insincerity in her voice.";

begintalknode;
	state = 886;
	nextstate = 887;
	question = "_You only sell gloves?_";
	text1 = "_Yes, but you can sell me goods. Any goods. From anywhere._ She winks. _Then you can purchase my fine, high quality gloves._";
	text2 = "_You may have heard I have other goods. I sure don't. Just wonderful, protective, warm, snug, five-fingered gloves._";

begintalknode;
	state = 887;
	nextstate = -1;
	condition = gf(14,9) == 0;
	question = "_Really nothing else. You're sure._";
	text1 = "Kendra sighs. _Well, I don't sell anything else. Others do. If you're interested, talk to Irvine. He's in Shayder, for now._";

begintalknode;
	state = 885;
	nextstate = -1;
	question = "_I want to do some shopping._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Kendra's Gloves","Kendra only sells gloves. They're not even very good gloves.",90,5,3);
	break;

begintalknode;
	state = 885;
	nextstate = -1;
	condition = has_spec_item(41) > 0;
	question = "_I have a package for you. It's from Irvine in Shayder._";
	code =
		run_hardcode(152);
	break;

begintalknode;
	state = 885;
	nextstate = -1;
	condition = gf(14,9) >= 1;
	question = "_I would like to enter the Thieves' Guild._";
	code =
		run_hardcode(153);
	break;

begintalknode;
	state = 885;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_Oh._ She returns to inexpertly repairing a glove.";
	action = END_TALK;

// Geoffrey

begintalknode;
	tag = 520;
	state = -1;
	nextstate = 913;
	question = "Geoffrey";
	text1 = "This man wears leather armor. A peculiar eye insignia has been carefully painted on the breast. There is a sword lying across his lap, and black goo covers the blade. He looks really tough.";
	text2 = "_I am Geoffrey. Welcome to the Guild._";
	text5 = "Geoffrey watches you silently. His hand rests on the hilt of his dark blade at all times.";
	action = INTRO;
	
begintalknode;
	state = 913;
	nextstate = -1;
	question = "_Why do you have a sword on your lap?_";
	text1 = "He pats the sword. _Let's just say that this is a high risk occupation. The Empire's agents are everywhere. If you hadn't delivered the herbs, I would never have felt safe contacting you._";
	text2 = "_I never go anywhere without the ability to kill at a moment's notice._ ";

begintalknode;
	state = 913;
	nextstate = 914;
	question = "_This is the Thieves' Guild?_";
	text1 = "He smiles coolly and rests his hand lightly on the hilt of the sword. _I control the Guild of Thieves._";


begintalknode;
	state = 914;
	nextstate = 915;
	question = "_Can you tell me what the Guild of Thieves is about?_";
	text1 = "_I will not say details about the guild. I will not let you join. You are too visible and dangerous. However, it may be to the guild's advantage to assist you._";

begintalknode;
	state = 915;
	nextstate = -1;
	question = "_Why can't I join the Guild?_";
	text1 = "_You are not, shall we say, a low profile traveler. Our guild is barely tolerated. Recruiting Avernites would be very bad for us. Ask instead how we may assist you._";

begintalknode;
	state = 915;
	nextstate = 913;
	question = "_How can you assist me?_";
	text1 = "He grins viciously. _Let me count the ways! I have valuable intelligence about access to Blackcrag Fortress. I know useful secrets about certain miscreants. I have access to fresh skribbane, as you know._";
	text2 = "_Also, you might find this amusing. I can sometimes help people pretend to be members of the Anama._";
	code =
		sf(14,8,1);
	break;

begintalknode;
	state = 913;
	nextstate = -1;
	condition = gf(14,8) > 0 && gf(15,6) < 3;
	question = "_I would like some skribbane._";
	text1 = "You conclude your business.";	
	code = 
		inc_flag(15,6,1);
		begin_shop_mode("Skribbane",
		  "Geoffrey sells the illegal drug skribbane to those who have developed a taste for it.",
		  91,1,0);	
	break;

begintalknode;
	state = 913;
	nextstate = -1;
	condition = gf(14,8) > 0 && gf(15,6) >= 3;
	question = "_I would like some skribbane._";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Skribbane",
		  "Geoffrey sells the illegal drug skribbane to those who have developed a taste for it. Interesting. His prices have recently gone up.",
		  91,6,0);	
	break;
	
begintalknode;
	state = 913;
	nextstate = 917;
	condition = gf(14,8) > 0;
	question = "_What is Blackcrag Fortress?_";
	text1 = "_It is well-known that the Empire has quarantined off Valorim to prevent the monster plagues from spreading. The gateway from the rest of the Empire to Valorim is Blackcrag Fortress. We have a tunnel to bring people and goods in and out of Valorim._";
	text3 = "_The gateway from the rest of the Empire to Valorim is Blackcrag Fortress. We have a tunnel to bring people and goods in and out of Valorim. It is east of Blackcrag, and you can now enter it safely._";
	action = DEP_ON_SDF 13 1 0;

begintalknode;
	state = 917;
	nextstate = 918;
	condition = gf(13,1) == 0;
	question = "_How can this tunnel of yours be useful to me?_";
	text1 = "_There is a tunnel through the mountains to the north. A fork of this tunnel is a secret entrance into Blackcrag Fortress. It is our tunnel, not yours,_ He grins. _But I can sell you permission to pass through it._";
	text2 = "_Permission to pass through can be had for a scant two thousand coins. If you want to obtain permission, let me know._";

begintalknode;
	state = 918;
	nextstate = 913;
	condition = gf(13,1) == 0;
	question = "_No, thank you. Maybe later._";
	text1 = "_Suit yourself. I'll be here if you change your mind._";

begintalknode;
	state = 918;
	nextstate = 913;
	condition = gf(13,1) == 0;
	question = "_I'll buy permission._ (Pay 2000 coins.)";
	text1 = "He collects the cash. _The tunnel is in a secret valley, about sixty miles east of Blackcrag Fortress. Enter, and the thieves there will explain where to go. Good luck._";
	text3 = "He looks very annoyed. _How dare you waste my time! You don't have the money!_";
	code =
		cs();
		if (coins_amount() < 2000)
			as(3);
			else {
				change_coins(-2000);
				as(1);
				sf(13,1,1);
				}
	break;

begintalknode;
	state = 913;
	nextstate = 919;
	condition = gf(14,8) > 0;
	question = "_I'm interested in any secrets you know._";
	text1 = "_A certain, normally successful thief was recently slain. He tried to run off with one of my packages, and he suffered an accident. An unfortunate accident. Complete disemboweling. Very sad._";
	text2 = "_At any rate, I know where he concealed his loot. I'll tell you for five hundred coins._";

begintalknode;
	state = 919;
	nextstate = 913;
	condition = gf(13,15) == 0;
	question = "_Where did he conceal his loot?_ (Pay 500 coins.)";
	text1 = "You pay the 500 coins. Geoffrey says, _He had this weird thing for hiding loot in stables. Heaven knows why. I know he left caches all over Valorim. When you find an animal pen in a town, though, take a look around. You might find something good._";
	text3 = "He looks very annoyed. _How dare you waste my time! You don't have the money!_";
	code =
		cs();
		if (coins_amount() < 500)
			as(3);
			else {
				change_coins(-500);
				as(1);
				sf(13,15,1);
				}
	break;
	
begintalknode;
	state = 919;
	nextstate = 913;
	condition = gf(13,15) == 0;
	question = "_Not interested._";
	text1 = "_Suit yourself. I'll be here if you change your mind._";


begintalknode;
	state = 913;
	nextstate = 920;
	condition = gf(14,8) > 0 && gf(15,9) == 0;
	question = "_How can I pretend to be an Anama member?_";
	text1 = "_The Anama are freaks, but they're sure to have a massive treasure in their temple. I can get some of the rings they use to mark themselves as members. You might be able to sneak into their inner sanctum wearing them._";
	text2 = "_If you ever want a set of their rings, they're only 2500 coins._";


begintalknode;
	state = 920;
	nextstate = 916;
	condition = gf(4,0) == 3;
	question = "_I find it insulting that you are peddling the symbol of my faith._";
	text1 = "He frowns, noting the Anama rings you already wear. Then he laughs. _I was just kidding! Sell the sacred symbols of your faith? I'd never dream of such a thing!_ He watches you carefully as he speaks, wondering if he'll have to kill you.";

begintalknode;
	state = 920;
	nextstate = 913;
	condition = gf(15,9) == 0;
	question = "_I'll buy some Anama rings._ (Pay 2500 coins.)";
	code =
		run_hardcode(154);
	break;

begintalknode;
	state = 920;
	nextstate = 913;
	condition = gf(15,9) == 0;
	question = "_That is too much money for some Anama rings._";
	text1 = "_Suit yourself.  But I'll be here if you change your mind._";

begintalknode;
	state = 913;
	nextstate = 921;
	condition = gf(14,8) > 0;
	question = "_Why does the Empire tolerate your activities?_";
	text1 = "_Well, the Empire is gone from here. But, even when they weren't, we were cunning. We had to be. The punishment was harsh._";

begintalknode;
	state = 921;
	nextstate = -1;
	question = "_What was the punishment?_";
	text1 = "_You, of all people, should not need to ask. The underworld. Many of my friends disappeared into Avernum. I have heard nothing of them since._";

// Bruskrud

begintalknode;
	tag = 640;
	state = -1;
	nextstate = 1201;
	question = "Bruskrud";
	text1 = "You meet the commander of the Lorelei guard. _I am Dervish Bruskrud. Have a seat, Avernite._ She points at a chair.";
	text2 = "Meeting an Empire Dervish and not instantly being attacked is a surprise. It is worrying that she immediately recognizes you for who you are.";
	text5 = "_What more do you want, Avernite?_ The commander of the guard sits writing notes and orders, but she wears full plate armor while doing it. Not surprising, considering she's an Empire Dervish, the most dedicated and single-minded of the Empire's troops.";
	action = INTRO;
	
begintalknode;
	state = 1201;
	nextstate = -1;
	condition = gf(9,2) == 1;
	question = "_Mayor Knight told me to come and find you._";
	text1 = "_Indeed. I have already heard from the mayor. You made quite a positive impression. That is why I was willing to consider speaking with you._";
	text2 = "_I hope that you will justify his trust._";
	code =
		sf(9,2,2);
		toggle_quest(105,10);
	break;
	
begintalknode;
	state = 1201;
	nextstate = -1;
	condition = gf(307,8) > 0 && gf(15,7) == 0;
	question = "_The giants have turned their attentions to a different foe._ (Tell the tale.)";
	text1 = "Bruskrud listens to the tale of the Barrier Cavern. She is fascinated. _It sounds like you have done much for us. I would repay Avernum for this aid, but I am a mere Commander. I don't have the power._";
	text2 = "_There is someone who does, though. His name is General Baziron, and he is stationed in Tevrono, to the northwest. He leads the battle against the golems there._";
	text3 = "_I will send word ahead. You should talk to him, if you can. He is in a position to help you. He might be able to pay the debt we owe you._";
	code =
		sf(15,7,1);
		toggle_quest(109,1);
	break;

begintalknode;
	state = 1201;
	nextstate = 1202;
	question = "_How did you know that I am an Avernite?_";
	text1 = "She turns toward you, adjusting her breastplate slightly. _It's my job to know. I am the commander of the forces of Lorelei. I lead us in our battles against the giants. You're probably wondering why I am welcoming you._";

begintalknode;
	state = 1202;
	nextstate = -1;
	question = "_I do sometimes wonder why nobody attacks me._";
	text1 = "_I did not serve in the Avernum war, but I lost friends in it._ She shakes her head wearily. _That is ancient history. Now, only Avernites have had any luck fending off the plagues of monsters that afflict us._";
	text2 = "_That is why I have allowed you into our city. I wanted to get your help._";

begintalknode;
	state = 1202;
	nextstate = 1204;
	question = "_How goes your battle with the giants?_";
	text1 = "_You have but to look on the streets, to walk our empty streets among shattered buildings, to see the effect the giants have had on us. But that is not the worst of it. The worst thing is the feebleness of our leaders._";
	text3 = "_The giants bombarded us constantly. Now they only raid us occasionally. Alas, those raids still cost us dearly. And still, we receive no help from our leaders._";
	action = DEP_ON_SDF 307 8 0;

begintalknode;
	state = 1201;
	nextstate = 1204;
	question = "_How are things going, commander?_";
	text1 = "_I command my troops, all loyal and strong men and women, in the crushing war with the giants._ She clenches a gauntleted fist. _It would be less of a struggle if our leadership were not so feeble._";
	text3 = "_Better, but not by much. I command my troops, all loyal and strong, against the giants. Their attacks have been weaker and less frequent, but still dangerous._ She clenches a gauntleted fist. _It would be less of a struggle, if our leadership were not so feeble._";
	action = DEP_ON_SDF 307 8 0;

begintalknode;
	state = 1204;
	nextstate = 1205;
	question = "_What's wrong with your leadership?_";
	text1 = "She looks distressed, as if it's a struggle to say what she's saying. _Our mayor refuses to act! She lets our people die while waiting for the Empire to aid us. My Empire, that I swore to give my life for, has shut us off. We must fend for ourselves._";
	text3 = "She looks distressed, as if it's a struggle to say what she's saying. _Our mayor was slain in a giant raid. My Empire, that I swore to give my life to protect, has shut us off. We must fend for ourselves._";
	code =
		if (day_reached(210,2))
			remove_string(1);
			else remove_string(3);
	break;

begintalknode;
	state = 1205;
	nextstate = -1;
	question = "_How do you plan to fend for yourselves?_";
	text1 = "_That is why I have welcomed you here. You have won battles. We have not. I hoped there were things you could do for us._";
	code =
		sf(14,7,1);
	break;
	
begintalknode;
	state = 1205;
	nextstate = -1;
	question = "_The Empire doesn't help you, but you are still loyal to them?_";
	text1 = "_Imagine how difficult this is for me to say! I would rather be slain by the giants than turn from my leaders. But I have soldiers to protect, and the people of this town as well!_";
	text2 = "_That is why I am welcoming Avernites. Our people are more important than my oath._";
	code =
		sf(14,7,1);
	break;

begintalknode;
	state = 1201;
	nextstate = 1206;
	condition = gf(14,7) > 0;
	question = "_How are your troops holding up under the stress?_";
	text1 = "_Very well. My praise is scarce, but they deserve it. They are loyal and strong, if sometimes a little deranged._";

begintalknode;
	state = 1206;
	nextstate = -1;
	question = "_Deranged?_";
	text1 = "_Well, one fellow passing through here said he'd seen dragons. Dragons! As if they hadn't been wiped out years ago! Forget his name. He headed up to Dorngas to serve there. If you meet him, try not to get him started. He'd rant for hours!_";

begintalknode;
	state = 1201;
	nextstate = -1;
	condition = gf(14,7) > 0 && gf(15,8) <= 0;
	question = "_I would like to help you. Do you have any missions for me?_";
	code =
		run_hardcode(155);
	break;

begintalknode;
	state = 1201;
	nextstate = -1;
	condition = gf(15,8) == 1;
	question = "_I might have something belonging to one of your soldiers._ (Show her your items.)";
	action = REUSABLE;
	code =
		run_hardcode(155);
	break;

begintalknode;
	state = 1201;
	nextstate = -1;
	condition = gf(15,11) == 1 && (gf(31,16) > 0 || gf(31,17) > 0 || gf(31,18) > 0 || gf(31,19) > 0);
	question = "_I freed a soldier from the giant caverns._";
	action = REUSABLE;
	code =
		run_hardcode(32);
	break;
	
begintalknode;
	state = 1201;
	nextstate = -1;
	condition = 1;
	question = "_I don't have anything else to say._";
	text1 = "Bruskrud nods. _We've risked a lot letting you into our city. Don't disappoint us._";
	action = END_TALK;

// Winterhouse

begintalknode;
	tag = 660;
	state = -1;
	nextstate = 1229;
	question = "Winterhouse";
	text1 = "You meet the keeper of this small, cramped inn. You notice his leg is in a cast. _I'm Winterhouse. Welcome to the Caring Cubbyhole inn. We see a lot of adventurers here, so I'm sure you will feel at home._";
	text5 = "You meet the keeper of this small, cramped inn. You notice his leg is in a cast.";
	action = INTRO;

begintalknode;
	state = 1229;
	nextstate = -1;
	question = "_How did you hurt your leg?_";
	text1 = "_I went outside. Accidentally walked under a thrown boulder. My fault for going outdoors._";

begintalknode;
	state = 1229;
	nextstate = 1230;
	question = "_Greetings, innkeeper. Have any free rooms?_";
	text1 = "_Excuse me for not standing to greet you._ He pats his leg cast. _Had a little accident. We have a nice room free. It's only five coins for the night._";

begintalknode;
	state = 1229;
	condition = coins_amount() >= 5;
	nextstate = -1;
	question = "_I'll take a room._ Pay five coins.";
	text1 = "_Can't show you to your room, I'm afraid._ He tells you what room to go to. It hasn't been cleaned for a while, but it will do.";
	action = END_TALK;
	code =
		revive_party();
		change_coins(-5);
		relocate_char(get_pc_id(0),25,54,FALSE);
		relocate_char(get_pc_id(1),26,54,FALSE);
		relocate_char(get_pc_id(2),27,54,FALSE);
		relocate_char(get_pc_id(3),28,54,FALSE);
	break;

begintalknode;
	state = 1229;
	nextstate = 1231;
	question = "_Heard any interesting rumors lately?_";
	text1 = "He grins. _I heard something very intriguing about some sort of a really valuable artifact. Unfortunately, it's sort of slipped my mind. Fifty coins, however, may restore my memory._";

begintalknode;
	state = 1231;
	nextstate = 1229;
	question = "_I'm not interested._";
	text1 = "_Oh, well. Maybe you would like a nice, safe room for the night?_";

begintalknode;
	state = 1231;
	nextstate = 1229;
	question = "_All right. Here._ Give 50 coins.";
	text1 = "He takes your money. _I overheard Randall, the item salesman, say something about hearing something about this incredibly rare and powerful magic shield thing. You might want to ask him about it._";
	code =
		cs();
		if (coins_amount() < 50)
			as(3);
			else {
				change_coins(-50);
				as(1);
				sf(14,11,1);
				}
	break;

begintalknode;
	state = 1231;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_Fine._";
	action = END_TALK;
